package com.wave.spring.boot.plugs;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by weibo.xwb on 2017/8/15.
 */
@Component
public class MyBeanFactory implements BeanFactoryAware {
    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
       List<String> packages = AutoConfigurationPackages.get(beanFactory);
        System.err.println("p2="+packages);
    }
}
